<template>
  <!-- 标题 -->
  <view class="naigation_cell" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
    <view class="logo_cell">
      <image src="../../../static/images/logo.png" class="logo" />
      <text class="logo_text">新鲜 · 亲民 · 快捷</text>
    </view>
    <view class="search_cell">
      <text class="icon-search"><text class="text">搜索商品</text></text
      ><text class="icon-scan"></text>
    </view>
    <view></view>
  </view>
</template>

<script setup lang="ts">
// 获取屏幕边界到安全区域距离
const { safeAreaInsets } = uni.getSystemInfoSync();
</script>

<style scoped lang="scss">
.naigation_cell {
  background: url("@/static/images/navigator_bg.png");
  padding: 28px 10px 5px 10px;
  .logo_cell {
    display: flex;
    align-items: center;
    padding-top: 10px;
  }
  .logo {
    width: 80px;
    height: 16px;
  }
  .logo_text {
    color: white;
    border-left: 1px solid #ffffff;
    padding-left: 10px;
    font-size: 12px;
    margin-left: 10px;
  }
  .search_cell {
    display: flex;
    justify-content: space-between;
    color: #ffffff;
    margin-top: 16px;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 5px 8px;
    font-size: 14px;
    border-radius: 20px;
  }
  .icon-search {
    .text {
      margin-left: 5px;
    }
  }
}
</style>
